<!DOCTYPE html>
<!--
To change this license header, choose License Headers in Project Properties.
To change this template file, choose Tools | Templates
and open the template in the editor.
-->
<html>
    <head>
        <title>Lập danh sách khen thưởng, kỷ luật</title>
        <meta charset="UTF-8">
        <meta name="viewport" content="width=device-width, initial-scale=1.0">
    </head>
    <link rel="stylesheet" type="text/css" href="<?php echo base_url(); ?>public/css/style.css"/>
    <style type="text/css">
        body{
            background-color: gray;
        }
        #wapper{
            background-color: white;
            width: 1200px;
            margin: 0px auto;
            height: 960px;
            border: 1px solid #f7f7f7;
        }
        #content{
            width: 1200px;
            font-size: 20px;
            margin-top: 20px;
            margin-left: 50px;
        }
        table{
            margin-top: 10px;
            width: 1024px;

        }
        table,tr,th,td{
            border: 1px solid black;
            border-collapse: collapse;
        }
        th{
            background-color: blue;
        }
        th p{
            color: white;
            margin: 5px;
        }
        td{
            margin-left: 5px;
        }
        td p{
            margin: 5px;
        }
        #content a{
            font-size: 20px;
            font-weight: inherit;
        }
        #id-save,#id-delete{
            margin-top: 10px;
            height:30px;
            line-height: 30px;
            width:120px;
            font-weight: bold;
        }
    </style>
    <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js">
    </script>
    <script>
        $(document).ready(function() {
            $("#id-save").hide();
            $("#id-delete").hide();
            $("#show").hide();
            $("#showgioi").hide();
            $("#showsx").hide();
            $("#idk").click(function() {
                $("#show").show();
                $("#id-save").show();
                $("#id-delete").show();
            });
            $("#idg").click(function() {
                $("#showgioi").show();
                $("#id-save").show();
                $("#id-delete").show();
            });
            $("#idsx").click(function() {
                $("#showsx").show();
                $("#id-save").show();
                $("#id-delete").show();
            });
        });
    </script>
    <body>

        <div id="nav-top" style="width:1480px; margin-top:-10px;">
            <img  id="icon" style="margin-left:130px;" src="<?php echo base_url(); ?>public/img/logo-nav.png" alt="Quan ly ho so"/>
            <div class="nav-nav">
                <h1 style="font-size:30px; color: white; margin-left: 75px">XÉT DANH SÁCH KHEN THƯỞNG</h1>
            </div> <!--end .nav-nav-->
        </div><!--end.nav-top-->
        <div id="wapper">
            <div id="content">
                <a>Chọn danh hiệu khen thưởng cá nhân: </a>
               <!-- <select id="enter">
                    <option value="Kha" id="selected1">Khá</option>
                    <option value="gioi" id="selected2">Giỏi</option>
                    <option value="xuatsac" id="selected3">Xuất sắc</option>
                </select>-->
                <button id="idk" type="submit" name="kha">Khá </button>
                <button id="idg" type="submit" name="kha">Giỏi </button>
                <button id="idsx" type="submit" name="kha">Xuất sắc </button>

                <table>
                    <tr>
                        <th><p>STT</p></th>
                    <th><p>MSSV</p></th>
                    <th><p>Họ và tên</p></th>
                    <th><p>Ngày sinh</p></th>
                    <th><p>Lớp</p></th>
                    <th><p>Điểm TB</p></th>
                    </tr>

                    <!--hien thi danh sach sinh vien dat danh hieu KHA-->
                    <?php
                    $i = 1;
                    foreach ($svkt as $value) {
                        if ($value['Diem'] >= 7.5 && $value['Diem'] < 8.0) {
                            ?>
                            <tr id="show">
                                <td><p><?php echo $i ?></p></td>
                                <td><p><?php echo $value['Ma_SV'] ?></p></td>
                                <td><p><?php echo $value['HoTen_SV'] ?></p></td>
                                <td><p><?php echo $value['NgaySinh_SV'] ?></p></td>
                                <td><p><?php echo $value['Lop_SV'] ?></p></td>
                                <td><p><?php echo $value['Diem'] ?></p></td>
                            </tr>

                            <?php
                            $i++;
                        }
                    }
                    ?>
                    <!--hien thi danh sach sinh vien dat danh hieu GIOI-->
                    <?php
                    $i = 1;
                    foreach ($svkt as $value) {
                        if ($value['Diem'] >= 8.0 && $value['Diem'] < 9.5) {
                            ?>

                            <tr id="showgioi">
                                <td><p><?php echo $i ?></p></td>
                                <td><p><?php echo $value['Ma_SV'] ?></p></td>
                                <td><p><?php echo $value['HoTen_SV'] ?></p></td>
                                <td><p><?php echo $value['NgaySinh_SV'] ?></p></td>
                                <td><p><?php echo $value['Lop_SV'] ?></p></td>
                                <td><p><?php echo $value['Diem'] ?></p></td>
                            </tr>

                            <?php
                            $i++;
                        }
                    }
                    ?>
                    <!--hien thi danh sach sinh vien dat danh hieu XUATSAC-->
                    <?php
                    $i = 1;
                    foreach ($svkt as $value) {
                        if ($value['Diem'] >= 9.5) {
                            ?>

                            <tr id="showsx">
                                <td><p><?php echo $i ?></p></td>
                                <td><p><?php echo $value['Ma_SV'] ?></p></td>
                                <td><p><?php echo $value['HoTen_SV'] ?></p></td>
                                <td><p><?php echo $value['NgaySinh_SV'] ?></p></td>
                                <td><p><?php echo $value['Lop_SV'] ?></p></td>
                                <td><p><?php echo $value['Diem'] ?></p></td>
                            </tr>

                            <?php
                            $i++;
                        }
                    }
                    ?>
                </table>
                <form>
                    <button id="id-save" type="submit" name="save" value="Save">Lưu danh sách</button>
                    <button id="id-delete" type="submit" name="del" value="delete">Hủy</button>
                </form>
            </div><!--End #content-->
        </div><!--End #wapper-->
    </body>
</html>
